package com.project.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.project.bean.InOrderBean;
import com.project.service.InOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;

@RequestMapping("inOrder")
@RestController
public class InOrderController {
    @Autowired
    private InOrderService orderService;

    @RequestMapping("cutByItem")
    public IPage<InOrderBean> cutByItem(Integer pageNO, String name,
                                        LocalDate startDate, LocalDate endDate) {
        return orderService.cutByItem(pageNO, name, startDate, endDate);
    }



    @RequestMapping("findById")
    public InOrderBean findById(Integer orderId) {
        return orderService.findById(orderId);
    }



}
